Method of Launching Low-Priority Tasks

ABSTRACT

A driver is provided to manage launching of tasks at different levels of priority and within the parameters of the firmware interface. The driver includes two anchors for managing the tasks, a dispatcher and an agent. The dispatcher operates at a medium priority level and manages communication from a remote administrator. The agent functions to receive communications from the dispatcher by way of a shared data structure and to launch lower priority level tasks in respond to the communication. The shared data structure stores communications received from the dispatcher. Upon placing the communication in the shared data structure, the dispatcher sends a signal to the agent indicating that a communication is in the data structure for reading by the agent. Following reading of the communication in the data structure, the agent launches the lower priority level task and sends a signal to the data structure indicating the status of the task. Accordingly, a higher level task maintains its level of operation and spawns lower level tasks through the dispatcher in conjunction with the agent.

CROSS REFERENCE TO RELATED APPLICATION(S)

This application is a continuation of application Ser. No. 09/898,978,filed on Jul. 2, 2001, now pending, which is hereby incorporated hereinby reference.

BACKGROUND OF THE INVENTION

1. Technical Field

This invention relates to a driver operating in a firmware environment.More specifically, the driver manages launching of tasks at differentpriority levels while maintaining a predetermined level of operation.

2. Description of the Prior Art

Firmware is software that is stored in hardware, such that the softwareis retained even after power to the hardware ceases. At boot time, thefirmware of a computer or computer system stores and uses informationdescribing a computer's processors, nodes, memory and other devices. Thefirmware operates on a parallel platform to the operating system.

In prior art computers, the firmware enabled system interrupts to occurin order to launch different applications at different priority levels.The prior art systems require a greater amount of functionality toaccommodate system interrupts. Some firmware interface environmentsdisable system interrupts to reduce the amount of functionality requiredto operate the machines in the system. The Intel Extensible FirmwareInterface (EFI) is one firmware environment which reduces functionalityrequired to operate the machine by disabling interrupts. In addition todisabling system interrupts, tasks within the EFI may temporarilyincrease their priority level of operation, but they are not allowed todecrease the priority level. Accordingly, tasks operating within the EFIenvironment, or similar platforms, are not permitted to execute systeminterrupts to execute tasks that may be operating at different levels ofpriority and may increase priority levels.

There are two types of operating programs within the EFI: a driver andan application. The driver provides a set of resources, i.e. programminginterfaces. Once a driver is loaded within the firmware environment, itremains in the system for future application. The driver is notpermitted to load other drivers after its initialization has completed.In addition, the EFI also prohibits the ability to load applicationsfrom a resident driver. An application is an executable program that isloaded, executed and expires. During run time, the application can loadother drivers and applications. Accordingly, the application is executedfor loading a driver to operate within the firmware environment andwithin the protocols of the system.

There is therefore a need to launch a driver that will prioritizeexecution of different priority levels of tasks within the confines ofthe EFI firmware environment. The driver must be launched by anapplication that will allow it to remain resident within the firmwareand will provide all the required protocols for operating independentlyand without the need to launch secondary drivers. Accordingly, it isdesirable to design a driver that will allow lower priority levelapplications to be launched without executing a system interrupt andwithout changing the priority level of a higher level applicationalready in use.

SUMMARY OF THE INVENTION

This invention comprises a driver for operating in a firmwareenvironment. The driver manages launching of tasks at different prioritylevels while maintaining a predetermined level of operation.

In one aspect of this invention, a computer system is provided with aremote administrator located in firmware, and a set of resources loadedin the firmware and in communication with the remote administrator. Theresources include a message manager, a task manager, and a sharedlocation. The message manager operates at a high priority level toreceive a message from the administrator to launch a low priority leveltask; the task manager operates at a low priority level to launch thelow priority level task; and the shared location, which is accessible byboth the message manager operating at the high priority level and thetask manager operating at the low priority level, facilitatescommunication between the message manager and the task manager. Themessage manager communicates the low priority level task received fromthe message manager to the task manager through the shared location. Thetask manager launches the low priority level task received from themessage manager in response to receipt of the message in the sharedlocation. At all times, the task manager maintains the low prioritylevel of operation and the message manager maintains the high prioritylevel of operation.

In another aspect of the invention, an article is provided with acomputer-readable recordable data storage medium including a remoteadministrator located in firmware and a set of resources in the firmwarein communication with the remote administrator. Means in the medium areprovided to manage tasks to facilitate communication and execution oftasks. This means includes means in the medium to maintain a messagemanager at a high priority level to receive a message from the remoteadministrator within system firmware to launch a low priority task. Inresponse to receipt of the message by the message manager, means areprovided for the message manager to place the message in a sharedlocation accessible by both the message manager operating at a highpriority level and a task manager operating at a low priority level.Furthermore, means are provided to communicate the low priority leveltask to the task manager in response to placement of the message in theshared location, and means are provided for the task manager to launchthe low priority task received from the message manager in response toreceipt of a communication from the message manager in the sharedlocation. At all times, the message manager maintains operation at thehigh priority level and the task manager maintains operation at the lowpriority level.

Other features and advantages of this invention will become apparentfrom the following detailed description of the presently preferredembodiment of the invention, taken in conjunction with the accompanyingdrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of the driver according to the preferredembodiment of this invention, and is suggested for printing on the firstpage of the issued patent.

FIG. 2 is a flow chart illustrating the process of initializing thedriver.

FIG. 3 is a flow chart illustrating the process of launching a lowerpriority task.

DESCRIPTION OF THE PREFERRED EMBODIMENT Overview

In a low-level operating environment, system interrupts may be disabledto reduce the amount of functionality required to operate the machine.This environment allows operating functions to increase their specificlevel of operation, but does not allow them to decrease their level ofoperation. The method and system of the preferred embodiment employ ashared data structure in conjunction with a communication tool to allowa higher priority task to launch lower priority tasks. Accordingly, thisallows for a higher priority task to maintain a specific level ofoperation.

Technical Details

Specific extensible firmware environments are known to operate at a lowlevel without the use of system interrupts. The Intel EFI is one suchfirmware environment. In addition to disabling interrupts, the firmwareplaces additional limitations in its functionality. For example, thefirmware limits a task to one of three priority levels, low, medium andhigh. A given task may temporarily increase its priority level ofoperation if it is operating at a low or medium priority level, but itis not allowed to decrease its level of operation. In addition, the onlyplace the firmware enables a driver to load other firmware modules is inits initialization code. Accordingly, a driver to enable launching oflower priority tasks must work within the confines of the firmwareprotocols.

The driver must provide for a higher priority task to maintain operationat a higher level of operation, i.e. high or medium level in a threetier environment. FIG. 1 is a block diagram (10) illustrating the flowof communication in the diagnostic device driver of the preferredembodiment. The two primary components of the driver are a dispatcher(20) for receiving messages from a remote administrator (30), and anagent (40) for launching lower level tasks. The remote administrator(30) exists within the firmware and is responsible for runningdiagnostics. The dispatcher (20) receives messages from the remoteadministrator (30) and responds to receipt of the messages. Uponreceiving a communication from the remote administrator (30), thedispatcher (20) communicates receipt to a data structure (50).Accordingly, the dispatcher (20) functions as a communication tool fromthe remote administrator (30) to the data structure (50).

The dispatcher (20) operates at a medium priority level and functions toreceive and respond to messages from a remote administrator (30), and toplace the messages in the shared data structure (50). Within therestrictions of the firmware environment, the dispatcher is unable toload tests. The dispatcher (20) does not execute operations, rather itfunctions as a communication tool for a higher level task desiring tolaunch a lower level task. In the confines of the system design, thehigher level task cannot lower its priority level. Therefore, the higherlevel task must communicate the desire to spawn a lower priority leveltask. The agent (40) is resident at a lower priority level to act as acommand dispatcher and to launch applications and load drivers (45) atlower priority levels. Accordingly, the dispatcher (20) is employed toassist in the spawning of tasks at a lower priority level of operationthan the higher level task.

The data structure (50) is shared between the dispatcher (20) and theagent (40). The shared memory provides a basis for communication betweenthe higher level task and the agent (40). The shared data structure (50)is a communication base shared by the two components. The agent (40)operates at a lower priority level than the dispatcher (20). Uponreceiving messages from the remote administrator (30), the dispatcher(20) communicates receipt with the shared data structure (50). Theshared data structure (50) communicates receipt of a communication fromthe dispatcher to the agent (40). A flag (55) is utilized as acommunication tool from the shared data structure (50) to the agent(40). Accordingly, the dispatcher (20) and the agent (40) are the twomajor components of the diagnostic driver utilizing the flag (55) as thecommunication tool therebetween.

The agent (40) functions to launch lower level tasks in a loop. Theagent (40) launches a lower level task only when prompted to do so by anevent triggered by a higher level task. The agent (40) functions toperform a desired activity on behalf of the higher level task, whileallowing the higher level task to maintain operation at its specifiedlevel. The flag (55) is instituted to awaken the agent (40) when aspawning of a lower level task is desired. Upon receiving the flag (55),the agent (40) reads the message placed in the shared data structure bythe dispatcher (20). The flag (55) is a signal for the agent (40) toread the shared data structure (50) at a particular position. The agent(40) then launches the requested task at the lower priority level. Oncethe lower level task (60) has been launched, the agent (40) resets theflag (55). Accordingly, the agent (40) remains in an inactive stateuntil such time as a flag (55) is set by the placement of a commandmessage in the shared data structure (50).

FIG. 2 is a flow chart (200) illustrating implementation of thestructure of the preferred embodiment. The firmware only permits driversto load other firmware modules in its initialization code, it does notpermit a driver to load other drivers after the driver's initializationhas completed. Within these confines, the agent in the form of anapplication is the first module to be loaded (210). An application canload other applications and drivers during run time. The agentapplication is responsible for loading the remaining components of thestructure, including the dispatcher (220). The remote administrator isexistent within the firmware, and does not require any loading by theagent application. The remote administrator represents a control entitywithin the firmware and is responsible for running diagnostics and apath to the user interface. During loading of the dispatcher driver(220), the dispatcher and the remote administrator handshake (230),thereby making both the dispatcher and the remote administrator aware oftheir functions. Additionally, the dispatcher and the agent handshake(240) making both anchors aware of their related functions. In apreferred embodiment, the order of the handshaking steps (230) and (240)is interchangeable and is not critical to the function of the driver.The agent application acts as a command dispatcher for the diagnostictest following installation as a driver. This allows the dispatcher tospawn sub-tests at a lower priority. Accordingly, loading the structurein the form of drivers and adhering to the firmware guidelines allowsthe drivers within the structure to operate in stages.

FIG. 3 is a flow chart (300) illustrating the process of launching alower priority level task from a higher level priority task. The remoteadministrator sends a message to the dispatcher (310) indicating theneed to launch a lower priority level task. The dispatcher communicatesreceipt of the message from the remote administrator by placing amessage in the shared data structure (320). Upon receiving a messagefrom the shared dispatcher, the shared data structure sends a signal tothe agent (330) indicating the need to launch a lower priority leveltask. The agent receives the signal and reads the instructions placed inthe shared data structure. Following receipt of the instructions, theagent spawns the requested lower priority level task (340). Once thelower priority level task has been launched, the agent sends a signal tothe data structure (350) indicating launching of the lower prioritylevel task. The agent remains idle until the next time it receives asignal (330) from the shared data structure to launch a lower prioritylevel task. Accordingly, the process employed for launching lowerpriority level tasks from a higher priority level tasks allows the agentto remain in memory in an inactive state until events cause the agent tobecome active.

Advantages Over the Prior Art

Prior art systems are designed to accommodate system interrupts topermit spawning of different tasks at different levels of operation. Toeither avoid the use of system interrupts, or in an environment wheresystem interrupts are disabled, the invention permits the launching oflower priority level tasks without requiring the need to invoke a systeminterrupt or await a pause in the higher level task's operations.

Alternative Embodiments

It will be appreciated that, although specific embodiments of theinvention have been described herein for purposes of illustration,various modifications may be made without departing from the spirit andscope of the invention. In particular, the scope of the invention is notlimited to a three level system. The invention may be incorporated intoa system with fewer or greater priority levels of operations. Inaddition, the invention may be incorporated into a system designed toaccommodate system interrupts. Accordingly, this would allow the systemto continue operation by disabling interrupts and incorporating thedriver herein to enable launching of lower priority level tasks duringoperation of a higher priority level task.

In addition to operation of the system, the method of installing thedriver is merely a preferred method of installing the components of thedriver. However, there may be alternative methods of installation whichwould allow the components of the driver to function within the designparameters of the system firmware. Additionally, the agent does notnecessarily have to be a cooperative agent application. Accordingly, thescope of protection of this invention is limited only by the followingclaims and their equivalents.

1. A computer system comprising: a remote administrator located infirmware; a set of resources loaded in said firmware and incommunication with said remote administrator, said resources comprising:a message manager operating at a high priority level to receive amessage from said administrator to launch a low priority level task; atask manager operating at a low priority level to launch said lowpriority level task; a data structure to store said message sharedbetween said message manager and said task manager to facilitatecommunication between said message manager and said task manager; saidmessage manager to communicate said low priority level task to said taskmanager through said data structure; said task manager to launch saidlow priority level task received from said message manager in responseto receipt of said message in said data structure and absent asuspension selected from the group consisting of a system interrupt anda pause in a higher level task operation; and a flag to indicate to saidtask manager receipt of said message in said data structure, whereinsaid task manager reads said message in said data structure and launchessaid low priority level task in response to said flag, and wherein saidtask manager resets said flag following launch of said low prioritylevel task.
 2. The computer system of claim 1, wherein said messagemanager is a dispatcher.
 3. The computer system of claim 1, wherein saidtask manager is an agent.
 4. The computer system of claim 1, whereinsaid higher priority task maintains a level of operation.
 5. An articlecomprising: a computer-readable recordable data storage medium; means inthe medium for receiving a message from a remote administrator withinsystem firmware to launch a low priority level task, wherein receipt ofsaid message is by a message manager operating at a high priority level;means in the medium for storing said message in a data structure sharedbetween said message manager and a task manager operating at a lowpriority level; and means in the medium for communicating said lowpriority level task to said task manager through said data structure,including setting a flag to signal receipt of said message and said taskmanager reading said message in said data structure and launching saidlow priority level task in response to said flag, including means in themedium for launching a said low priority level task received from saidmessage manager in response to receipt of said message and absent asuspension selected from the group consisting of: a system interrupt anda pause in a higher level task operation, wherein said task managerresets said flag following launch of said low priority level task. 6.The article of claim 5, further comprising means in the medium formaintaining a level of operation by a higher priority level task.